typedef struct Chain {
    int data;
    struct Chain* (*set_data)(struct Chain*, int);
} Chain;

static Chain* set_data(Chain* self, int val){
    if (self != NULL)
        self->data = val;
    
    return self; // 返回本结构体指针以便继续其他成员函数呼叫
}

Chain chain_instance = { .data=0 , .set_data=set_data };

int main(){
    chain_instance.set_data(&chain_instance, 5)->set_data(&chain_instance, 10); 
    printf("%d\n", chain_instance.data);   /* Output should be "10" */
    return 0;
}
